<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //素数
        function getPrime(num) {
            if (num % 1 == 0 && num % num == 0) {
                return num;
            } else {
                return 'no';
            }
        }
        var re = getPrime(10);
        console.log(re + '是质数');
        //三数最大值

        function getmax(a, b, c) {
            var max = 0;
            if (a > b) {
                max = a;
                if (a > c) {
                    max = a;
                    return max;

                } else {
                    max = c;
                    return max;
                }
            } else {
                max = b;
                if (b > c) {
                    max = b;
                    return max;

                } else {
                    max = c;
                    return max;
                }
            }
        }
        var ret = getmax(5, 2, 9);
        console.log(ret);

    </script>
</head>

<body>

</body>

</html>